/* maincpp.i */
%module maincpp

%{
/* Put header files here or function declarations like below */
#include "../src_cpp/help.h"
#include "../src_cpp/sql.h"
#include "../src_cpp/sqlite3.h"
#include "../src_cpp/test.h"
#include "../src_cpp/types.h"
#include "../src_cpp/interface.h"
int interface_login(char * username, char * passwd, int level, int flag);
int interface_add_user(char * username, char * passwd);
int interface_delete_user(char * username);
int interface_add_file(char * filename, char * content);
int interface_delete_file(char * filename);
int interface_revoke_right(char * username, char * filename, char * right);
int interface_transfer_right(char * username, char * filename, char * right);
const char * interface_get_current_user();
extern std::vector <user> Subjects;
extern std::vector <file> Objects;
extern std::vector <SOA> ACM;
int interface_test();
int interface_get_subjects_num();
const char * interface_get_subjects_name(int i);
const char * interface_get_subjects_passwd(int i);
int interface_get_objects_num();
const char * interface_get_objects_filename(int i);
const char * interface_get_objects_creator(int i);
const char * interface_get_objects_content(int i);
int interface_get_right_num();
const char * interface_get_right_username(int i);
const char * interface_get_right_filename(int i);
const char * interface_get_right_from(int i);
int interface_get_right_access(int i);

%}

int interface_login(char * username, char * passwd, int level, int flag);
int interface_add_user(char * username, char * passwd);
int interface_delete_user(char * username);
int interface_add_file(char * filename, char * content);
int interface_delete_file(char * filename);
const char * interface_get_current_user();
int interface_revoke_right(char * username, char * filename, char * right);
int interface_transfer_right(char * username, char * filename, char * right);
extern std::vector <user> Subjects;
extern std::vector <file> Objects;
extern std::vector <SOA> ACM;
int interface_test();
int interface_get_subjects_num();
const char * interface_get_subjects_name(int i);
const char * interface_get_subjects_passwd(int i);
int interface_get_objects_num();
const char * interface_get_objects_filename(int i);
const char * interface_get_objects_creator(int i);
const char * interface_get_objects_content(int i);
int interface_get_right_num();
const char * interface_get_right_username(int i);
const char * interface_get_right_filename(int i);
const char * interface_get_right_from(int i);
int interface_get_right_access(int i);